<?php 
	$this->headScript()->appendFile(HTTP_HOST.'/js/site-admin/cities.js'); 
	$this->headScript()->appendFile(HTTP_HOST.'/js/jQuery/jquery.cleditor.min.js');
	$this->headLink()->appendStylesheet(HTTP_HOST.'/css/jquery/cleditor/jquery.cleditor.css');
?>

<h3><?=$this->region['ID'] == 0 ? $this->translate('Добавить город') : $this->translate('Редактировать город')?></h3>

<input type="hidden" name="id" value="<?=$this->city['ID']?>" />
<table border="1">
	<tr>
		<td><?=$this->translate('Город')?>: </td>
		<td><input type="text" name="Name" value="<?=$this->city['Name']?>" /></td>
	</tr>
	<tr>	
		<td><?=$this->translate('Страна')?>: </td>
		<td><?=$this->formSelect('CountryID', $this->city['CountryID'], array('onchange' => 'reloadRegions(this.value);'), $this->countries);?></td>
	</tr>
	<tr>	
		<td><?=$this->translate('Регион')?>: </td>
		<td><?=$this->formSelect('RegionID', $this->city['RegionID'], array(), $this->regions);?></td>
	</tr>
	<tr>	
		<td><?=$this->translate('Активная')?>: </td>
		<td>
			<input type="checkbox" name="active"<?=$this->city['active'] == 1 ? ' checked="checked"' : ''?>/>
		</td>
	</tr>
	<tr>	
		<td><?=$this->translate('СЕО Титл')?>: </td>
		<td><textarea name="seoTitle"><?=$this->city['seoTitle']?></textarea></td>
	</tr>
	<tr>	
		<td><?=$this->translate('СЕО Описание')?>: </td>
		<td><textarea name="seoDescription"><?=$this->city['seoDescription']?></textarea></td>
	</tr>
	<tr>	
		<td><?=$this->translate('СЕО Ключевые слова')?>: </td>
		<td><textarea name="seoKeywords"><?=$this->city['seoKeywords']?></textarea></td>
	</tr>
	<tr>	
		<td><?=$this->translate('Страница города')?>: </td>
		<td><textarea name="pageText"><?=stripslashes($this->city['pageText'])?></textarea>
		<script type="text/javascript">
			$('textarea[name="pageText"]').cleditor();
		</script>
		</td>
	</tr>
	<tr>
		<td colspan="2">
			<input type="button" value="<?=$this->translate('Сохранить')?>" onclick="saveCity();" />
		</td>
	</tr>
</table>